#ifndef SERVERMENU_H
#define SERVERMENU_H

#include <QObject>
#include <QtWidgets/QMenu>
#include <QtWidgets/QAction>
#include <QDesktopServices>
#include <QUrl>
 #include <QStyleFactory>

class ServerMenu : public QMenu
{
	Q_OBJECT

public:
	ServerMenu(QString &name, quint16 id, QObject *parent = 0);
	~ServerMenu();
	void						init();

private:
	quint16						_id;
	bool						_mode;
	QAction						*_connect;
	QAction						*_config;
	QIcon						*_connected;
	QIcon						*_disconnected;

public:
	quint16						getId() const;
	void						setId(quint16);

	void						changeName(QString &);

	void						connectMode();
	void						disconnectMode();

public slots:
	void						changeMode();
	void						handleConfig();

signals:
	void						changeMode(quint16, bool);
	void						config(quint16);
};

#endif // SERVERMENU_H
